import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/view/Login'
import error from '@/view/404'
import Home from '@/components/home'
import welcome from '@/view/welcome/welcomePage'
import member from '@/view/power/member'
import role from '@/view/power/role'
import recruit from '@/view/team/recruit/index'
import recruitAdd from '@/view/team/recruit/add'
import recruitEdit from '@/view/team/recruit/edit'
import recruitDetail from '@/view/team/recruit/detail'
import album from '@/view/news/album'
import chargerBuild from '@/view/apply/charger/index'
import imageText from '@/view/news/imageText/index'
import imageTextAdd from '@/view/news/imageText/add'
import imageTextEdit from '@/view/news/imageText/edit'
import imageTextDetail from '@/view/news/imageText/detail'
import video from '@/view/news/video'
import appUser from '@/view/app/user/index'
import appArticle from '@/view/app/article/index'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
      path: '/404',
      name: '404',
      component: error
    },
    {
      //首页
      path: '/home',
      name: 'home',
      component: Home,
      children: [
        {
          //欢迎页面
          path: '/home/welcome',
          name: 'welcome',
          component: welcome
        },
        {
          path: '/home/member',
          name: 'member',
          component: member
        },
        {
          path: '/home/powerlist',
          name: 'role',
          component: role
        },
        {
          path: '/news/album',
          name: 'album',
          component: album
        },{
          path: '/team/recruit',
          name: 'recruit',
          component: recruit
        },{
          path: '/team/recruit/add',
          name: 'recruitAdd',
          component: recruitAdd
        },{
          path: '/team/recruit/edit/:recruitId',
          name: 'recruitEdit',
          component: recruitEdit
        },{
          path: '/team/recruit/detail/:recruitId',
          name: 'recruitDetail',
          component: recruitDetail
        },{
          path: '/charger/apply',
          name: 'chargerBuild',
          component: chargerBuild
        },{
          path: '/news/imageText',
          name: 'imageText',
          component: imageText
        },{
          path: '/news/imageText/add',
          name: 'imageTextAdd',
          component: imageTextAdd
        },{
          path: '/news/imageText/edit/:imageTextId',
          name: 'imageTextEdit',
          component: imageTextEdit
        },{
          path: '/news/imageText/detail/:imageTextId',
          name: 'imageTextDetail',
          component: imageTextDetail
        },{
          path: '/news/video',
          name: 'video',
          component: video
        },{
          path: '/app/user',
          name: 'appUser',
          component: appUser
        },{
          path: '/app/article',
          name: 'appArticle',
          component: appArticle
        }
      ]
    }


  ]
})

